package cn.iocoder.yudao.module.biz.dal.mysql.risk.riskWarningSignCategory;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.biz.controller.admin.risk.riskWarningSignCategory.vo.*;
import cn.iocoder.yudao.module.biz.dal.dataobject.risk.riskWarningSignCategory.BizRiskWarningSignCategoryDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 警示标志类别 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface BizRiskWarningSignCategoryMapper extends BaseMapperX<BizRiskWarningSignCategoryDO> {

    default PageResult<BizRiskWarningSignCategoryDO> selectPage(BizRiskWarningSignCategoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BizRiskWarningSignCategoryDO>()
                .likeIfPresent(BizRiskWarningSignCategoryDO::getWarningSignCategory, reqVO.getWarningSignCategory())
                .betweenIfPresent(BizRiskWarningSignCategoryDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
                .orderByDesc(BizRiskWarningSignCategoryDO::getCreateTime));
    }

    default List<BizRiskWarningSignCategoryDO> selectList(BizRiskWarningSignCategoryExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<BizRiskWarningSignCategoryDO>()
                .likeIfPresent(BizRiskWarningSignCategoryDO::getWarningSignCategory, reqVO.getWarningSignCategory())
                .betweenIfPresent(BizRiskWarningSignCategoryDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
                .orderByDesc(BizRiskWarningSignCategoryDO::getCreateTime));
    }

}
